package mindteck.store;

import java.sql.Connection;
import java.sql.SQLException;

import oracle.jdbc.pool.OracleConnectionPoolDataSource;


public class BaseDAO {
	 Connection connection;
	private OracleConnectionPoolDataSource ocpds;
	
	
	public BaseDAO(){
		
	}
	
	protected Connection getPoolOfConnections(){
		try{
			ocpds = new OracleConnectionPoolDataSource();
			ocpds.setDriverType("oracle.jdbc.driver.OracleDriver");
			ocpds.setURL("jdbc:oracle:thin:@localhost:1521:orcl");
			ocpds.setUser("aristide");
			ocpds.setPassword("aristide");
			connection = ocpds.getConnection();
		}catch(SQLException ex){
			
			System.out.println(ex.getMessage());
		}
		
		
		return connection;
	}

	
}
